package hk.meiyan.com.kotlincode.adapter

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import hk.meiyan.com.kotlincode.R
import kotlinx.android.synthetic.main.activity_adapter.*

class AdapterActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_adapter)


        var bean = Bean("侯坤",0)
        var bean1 = Bean("df",4)
        var bean2 = Bean("侯坤",0)
        var bean4 = Bean("sd",3)

        var array:List<Bean> = listOf(bean ,bean1,bean2,bean4)
        var adapter = MyAdapter(this,array)
        listview.adapter = adapter
    }
}
